package com.ecloud.openapi.security.convert;

import java.util.List;

import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import com.ecloud.openapi.security.dto.BaseOperationDto;
import com.ecloud.openapi.security.po.BaseOperationPo;
import com.ecloud.openapi.security.vo.BaseOperationVo;

/**
 * BaseOperationConvert 模型转换
 *
 * @author LiuGangQiang Create in 2021/07/04
 */
@Mapper
public interface BaseOperationConvert {
    BaseOperationConvert INSTANCE = Mappers.getMapper(BaseOperationConvert.class);

    /**
     * {@link BaseOperationDto}对象 >> {@link BaseOperationPo}对象
     *
     * @author LiuGangQiang Create in 2021/07/04
     * @param dto 入参
     * @return {@link BaseOperationPo} 对象
     */
    BaseOperationPo dtoToPo(BaseOperationDto dto);

    /**
     * {@link BaseOperationDto}集合 >> {@link BaseOperationPo}集合
     *
     * @author LiuGangQiang Create in 2021/07/04
     * @param dtos 入参
     * @return {@link BaseOperationPo} 集合
     */
    List<BaseOperationPo> dtoToPo(List<BaseOperationDto> dtos);

    /**
     * {@link BaseOperationPo}对象 >> {@link BaseOperationVo}对象
     *
     * @author LiuGangQiang Create in 2021/07/04
     * @param dto 入参
     * @return {@link BaseOperationVo} 对象
     */
    BaseOperationVo poToVo(BaseOperationPo po);

    /**
     * {@link BaseOperationPo}集合 >> {@link BaseOperationVo}集合
     *
     * @author LiuGangQiang Create in 2021/07/04
     * @param dtos 入参
     * @return {@link BaseOperationVo} 集合
     */
    List<BaseOperationVo> poToVo(List<BaseOperationPo> pos);
}
